Progress Bar

I'm using the progressStart, progressStep, and progressMessage functions to create a progress bar for a metrics collection script we use. The progressStep gets incremented for each module that is processed. The progressMessage is updated for every object (1 of n) and every module.

I have a couple issues.

1) The cancel button isn't always responsive. I tried putting the if(progressCancelled) function right inside my "for o in m" loop and it seemed to help a little but is inconsistent. Sometimes, I'll see the Object 1 of N message stop incrementing, but it never prompts me to exit. Instead, it ends up going to the next module.

2) If I move the progress bar dialog box on my screen, it stops updating until it gets to the next module (remember, I'm updating progressMessage for every object as well). Also, it goes white as if it is in the 'not responding' state of a program. Is there a way to have it keep updating even though I moved the box? However, I don't want it to appear on the top of my screen and interfere with my other work (well.. maybe it would be OK if it became the active window for each module... but for each object would be excessive).

Any suggestions are greatly appreciated! Let me know if you have any questions or need additional information.

Regards,
Dan
DanMott - Mon Sep 26 14:45:04 EDT 2011

Re: Progress Bar
OurGuest - Mon Sep 26 16:25:51 EDT 2011

My approach is remove progress bar from any dxl. Progress Bars will slow down the application and interfer with users interaction with the PC.

Re: Progress Bar
DanMott - Mon Sep 26 16:49:49 EDT 2011

OurGuest - Mon Sep 26 16:25:51 EDT 2011
My approach is remove progress bar from any dxl. Progress Bars will slow down the application and interfer with users interaction with the PC.

Thanks for the reply. I did some additional testing and have found that the progress bar code I used has minimal to no impact on execution time and does not interfere with interaction with the PC. I am able to continue work on other tasks without the progress bar popping up on my screen.

Re: Progress Bar
llandale - Mon Sep 26 18:19:12 EDT 2011

Sending an update for every object will surely chew up 'string table space' and end up costing memory and therefore slow you down. Perhaps update every 100 objects, or if you are inclinded update for an Object if its been X seconds since the last update (perhaps 10 seconds).

I had similar no-luck as you experienced and ended up coding a separate program, run from another DOORS client, that would tell the 1st DOORS client to stop working and come to a gracefull end. The "for module" loop would therefore have a "did the other dude ask me to stop" check. Haven't used that in a few years.

I think this is similar to my label DBE 'status' that I'd update. It would update for a while and then stop updating; and I'm thinking your progress bar is doing the same thing. Don't know why. If I were determined I would try some of the following:

>> put a "sleep_(X)" command before the progress check; where X is perhaps '10' milliseconds. Maybe that will jar it up enough to become responsive.
>> put a "sleep_(X)" command after every progress step command.
>> put far less updates, as I'm feeling like its the number of updates that puts it into limbo, not how long you've been running.
>> implement a 'timer' DBE that auto-checks if progress has been cancelled, and sets a global flag.

  • Louie